Renames a section in a standard format .ini file.
IniRenameSection ( "filename", "section", "new section" [, flag] )
Parameters
filename | The filename of the .ini file. |
section | The section name in the .ini file. |
new section | The new section name. |
flag | 0 (Default) - Fail if "new section" already exists. 1 - Overwrite "new section". This will erase any existing keys in "new section" |
Return Value
Success: | Non-zero |
Failure: | 0 and may set @error if the section couldn't be overwritten (flag = 0 only). |
Remarks
A standard ini file looks like:
Related
IniRead, IniDelete, IniWrite, FileReadLine, IniReadSection, IniReadSectionNames
Example
$res = IniRenameSection(@ScriptDir & "My.ini", "MySection", "MyNewSection")